import { useMyStore } from "@/store/index";
import { showToast } from "vant";
const pageContent =
  useMyStore().customArtwork.pageContent;
export const handleClick = (content) => {
  if (content.click.swiperIndex != undefined) {
    store.swiper.swipeTo(content.click.swiperIndex);
  } else if (content.click.total != undefined) {
    showToast(content.click.total);
  }
};
export const InspectElement = (name) => {
  console.log(pageContent);
  if (!pageContent.length) return false;
  return pageContent[useMyStore().pageIndex].some((item) => {
    console.log(item, name, "name");
    return item.name == name;
  });
};
